<!----------------------------------------------------------------------------首页主体内容---------------------------------------------------------------------------->
<!--开始 统计数据-->
<div class="yx-count">
    <h3 class="yx-data">统计数据：截至<?= date('Y-m-d') ?></h3>
    <div class="yx-count-cnt">
        <?php foreach ($StatisticalItem as $item) :?>
            <div class="yx-counter yx-counter<?=$item['id']?> col_fifth yx-radius5">
                <a href="<?= $item['url'] ?>">
                    <p class="yx-count-text "><?=$item['title']?></p>
                    <h2 class="timer yx-count-title" id="count-number" data-to='<?= $item['statistics']?>' data-speed="1500"></h2>
                    <span><?=$item['unit']?></span>
                    <?php if($item['id'] == 5) :?>
                        <h4 class="yx-compare">尽快解决<img src="../images/index-img-arrow.png"></h4>
                    <?php else:?>
                        <h4 class="yx-compare">较上月：<?=$item['compare']?></h4>
                    <?php endif;?>
                </a>
            </div>
        <?php endforeach;?>
    </div>
</div>
<!--结束 统计数据-->
<!--转化率统计-->
<!--以下是待办事项-->
<div class="yx-todo-list">

    <table class="yx-todo-header">
        <tbody>
        <tr>
            <td>ID</td>
            <td>
                <ul class="yx-todo-tab">
                    <?php foreach ($tabArr as $tab) :?>
                        <li class="yx-floatl" id="order_tab<?=$tab['id']?>" data-id="<?=$tab['id']?>"><?=$tab['title']?><span class="yx-radius50"><?=$tab['count']?></span></li>
                    <?php endforeach;?>
                    <div class="yx-clear"></div>
                </ul>
            </td>
            <td>操作</td>
        </tr>

        </tbody>
    </table>
    <div class="yx-todo-content">
        <?php if($list) :?>
            <?php foreach ($list as $item) :?>
                <table class="yx-todo-thing" id="order_table<?=$item['id']?>">
                    <tbody>
                    <?php if(!empty($item['list'])) :?>
                        <?php foreach ($item['list'] as $k=>$content) :?>
                            <tr>
                                <td><?=$k+1?></td>
                                <td><?=$content['title']?></td>
                                <td>
                                    <a href="<?=$content['url']?>"> <btn class="yx-todo-operate-btn yx-radius50">解决</btn></a>
                                </td>
                            </tr>
                        <?php endforeach;?>
                    <?php endif;?>
                    </tbody>
                </table>
            <?php endforeach;?>
       <?php endif;?>
    </div>

</div>
<!--以下是待办事项-->
<div class="yx-height490 yx-margin18 yx-renew-rate-box">
    <div class="yx-renew-rate yx-floatl">
        <!-- <h3 class="yx-data">续费率统计：（<span>--><? //=$conversions_start?><!--</span>-<span>-->
        <? //=$conversions_end?><!--</span>）</h3>-->
        <div id="chart-line" style="width: 100%; height: 400px;"></div>

    </div>

    <!---------------------------------------------------这个地方是分成比例饼状图---------------------------------------------------->
    <div id="canvas-holder" class="yx-divide yx-floatl">
        <!--<h3 class="yx-data">当前分成比例：</h3>-->
        <div id="main" style="width:100%;height:240px;"></div>
        <div class="yx-jigou-square">
            <h3 class="yx-floatl"><span class="yx-fk yx-bg76c6fe"></span>好评率</h3>
            <h3 class="yx-floatl"><span class="yx-fk yx-bgbfe673"></span>续费率</h3>
            <div class="yx-clear"></div>
        </div>
        <h4 class="yx-index-rate">机构好评率：<span class="">71%</span></h4>
        <h4 class="yx-index-rate">机构续费率：<span class="">29%</span></h4>
        <!--                <button class="yx-look-tabel yx-radius50 yx-bg57d9ad" >查看分成比例一览表</button>-->
    </div>
    <div class="yx-clear"></div>
</div>
<!--结束 转化率统计-->
<a class='button' id='conversion_time' style="display: none" data-size='1300*500'
   data-default='<?= $conversions_time_json ?>'></a>
<a class='button' id='conversion_value' style="display: none" data-size='1300*500'
   data-default='<?= $conversions_value_json ?>'></a>

<?php
$js = <<<JS

$("#order_table1").show().siblings().hide();
$("#order_tab1").addClass("active");

$(".yx-todo-tab li").click(function() {
    var tab_id=$(this).data("id");
    var table_height= $("#order_table"+tab_id).height();
    $(this).addClass("active").siblings().removeClass("active");
    $("#order_table"+tab_id).show().siblings().hide();
    
})
$(".content-wrapper").css('min-height','600px');
//折线图
var conversion_time=$('#conversion_time').data('default');
var conversion_value=$('#conversion_value').data('default');
//conversion_jsons =JSON.stringify(conversion_time);
var lineChart = echarts.init(document.getElementById('chart-line'));
option = {
    title: {
        text: '转化率统计',
        textStyle: {
            fontSize: 16,
            fontWeight: '400',
            color: '#464656'          // 主标题文字颜色
        },
    },
    tooltip: {
        trigger: 'axis'
    },
    grid: {
        width:'95%',
        left: '-2px',
        right: '0',
        bottom: '15%',
        containLabel: true
    },
    toolbox: {
        feature: {
            saveAsImage: {}
        }
    },
    color :['#69c1fd'],
   
    dataZoom:
       {
           start:1
    },
    xAxis: {
        type: 'category',
        boundaryGap: false,
        data:conversion_time
    },
    yAxis: {
        type: 'value',
		interval:10,
		max :100,
		min :0
    },
    series: [
        {
            name:'转化率统计',
            type:'line',
            stack: '总量',
            data:conversion_value
        }
    ]
};
lineChart.setOption(option);
/*窗口自适应，关键代码*/  
                setTimeout(function (){  
                    window.onresize = function () {  
                        resourceChart.resize();  
                        activeChart.resize();  
                    }  
                },200)  
//扇形图
var myChart = echarts.init(document.getElementById('main'));

option2 = {
    title : {
        text: '综合参数',
        subtext: '',
        textStyle: {
            fontSize: 16,
            fontWeight: '400',
            color: '#464656'          // 主标题文字颜色
        },
        
    },
    tooltip : {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c} ({d}%)"
    },
    
    color:['#bfe673','#76c6fe'],
    
    series : [
        {
            name: '好评率',
            type: 'pie',
            radius : '55%',
            center: ['50%', '60%'],
            label : {
                normal : {
                    textStyle : {                        
                        fontSize : 16
                    }
                }
            }, 
            data:[
                {value:186.5, name:'29%'},
                {value:580.6, name:'71%'}
            ],
            itemStyle: {
                emphasis: {
                    shadowBlur: 10,
                    shadowOffsetX: 0,
                    shadowColor: 'rgba(0, 0, 0, 0.5)'
                }
            }
        }
    ]
};
 // 使用刚指定的配置项和数据显示图表。
 lineChart.setOption(option)
 myChart.setOption(option2);

JS;
$this->registerJS($js);
?>





